#pragma once

#include <opencv2\opencv.hpp>

using namespace cv;

class SupportVectorMachine
{
private:
	CvSVM svm;

public:

	void set_trainer(CvSVM svm)
	{
		this->svm = svm;
	}

	CvSVM get_trainer()
	{
		return svm;
	}

	void train(Mat& data, Mat& label, CvSVMParams params)
	{
		svm.train(data, label, Mat(), Mat(), params);
	}

	float predict(const Mat& sample)
	{
		return svm.predict(sample);
	}
};